package com.example.secondhandmall.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.secondhandmall.R;

import java.util.List;

public class SearchFailureActivity extends BaseActivity {

    private TextView tvFailure;
    private String msg;
    private ImageView ivReturn;
    private TextView tvSearchWord;
    private List<String> failure;

    @Override
    protected int initLayout() {
        return R.layout.activity_search_failure;
    }

    @Override
    protected void initView() {
        tvFailure = findViewById(R.id.tv_failure);
        ivReturn = findViewById(R.id.iv_return);
        tvSearchWord = findViewById(R.id.tv_search_word);
    }

    @Override
    protected void initData() {
        ivReturn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        failure = (List<String>) getIntent().getSerializableExtra("failure");
        msg = failure.get(0);
        tvFailure.setText(msg);
        tvSearchWord.setText(failure.get(1));
    }
}